﻿namespace EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles
{
	public class Profile
	{
		public Profile(System.Configuration.ConfigurationSectionGroup sectionGroup)
		{
			LoadConfig(sectionGroup);
		}

		#region Properties
		/// Property Resources: Get, Set
		public EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles.Resources Resources { get; private set; }

		/// Property CallStatisticLimits: Get, Set
		public EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles.Charts.CallStatistic CallStatistic { get; private set; }

		/// Property AgentStatusLimits: Get, Set
		public EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles.Charts.AgentStatus AgentStatus { get; private set; }
		#endregion

		#region Utilities
		/// LoadConfig
		private void LoadConfig(System.Configuration.ConfigurationSectionGroup sectionGroup)
		{
			// check
			EFS.Common.Verify.Reference(sectionGroup, "sectionGroup");

			// set
			Resources = new EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles.Resources(sectionGroup.Sections["Resources"]);
			CallStatistic = new EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles.Charts.CallStatistic(sectionGroup.SectionGroups["Charts"].SectionGroups["CallStatistic"].Sections["Limits"]);
			AgentStatus = new EFS.RC.Wallboard.Common.Config.Sections.Phones.Profiles.Charts.AgentStatus(sectionGroup.SectionGroups["Charts"].SectionGroups["AgentStatus"].Sections["Limits"]);
		}
		#endregion
	}

}